package com.hzw.saas.web.app.schedule.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author hankun
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "添加日程参数")
public class UserScheduleAddParam {

    @NotBlank(message = "标题不可为空")
    @ApiModelProperty(value = "标题", required = true, position = -1)
    private String title;

    @ApiModelProperty(value = "日程描述/内容", position = 1)
    private String content;

    @NotNull(message = "提醒日期不可为空")
    @ApiModelProperty(value = "最近一次提醒日期", required = true, position = 2)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime dueDate;

    @ApiModelProperty(value = "分组id 1001:xxx|1002:生活|1003:工作|1004:学习|1005:家庭", position = 3)
    private String groupId;

    @ApiModelProperty(value = "标签id 1001:xxx|1002:进行中|1003:暂缓|1004:家中|1005:办公室|1006:户外\n" +
            "update时, 若此值为null时, 不修改标签属性\n" +
            "为空时, 例如[], 修改标签属性", position = 4)
    private List<String> tagIds;

    @ApiModelProperty(value = "优先级 0:无|1:低|2:中|3:高", position = 5)
    private Integer priority;

    @ApiModelProperty(value = "提醒规则 rrule", position = 6)
    private String repeatFlag;

    @ApiModelProperty(value = "是否跳过节假日 0:否 1:是", position = 6)
    private Integer skipWeekend;

    @ApiModelProperty(value = "提醒提前量", position = 7)
    private String aheadTime;

    @ApiModelProperty(value = "时间段 开始时间 yyyy-MM-dd HH:mm:ss", position = 8)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "时间段 结束时间", position = 9)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
}
